package org.example.hansp.genetic;

public class Generic02 {
    public static void main(String[] args) {
        Person<String> person=new Person<>("lim");
        Person<Integer> person2= new Person<Integer>(2001);
        System.out.println(person.getS());
        System.out.println(person2.getS());
        person.setS("frank");
        System.out.println(person.getS());
    }
}
class Person<E>{
    E s;

    public Person(E s) {
        this.s = s;
    }
    public E getS() {
        return s;
    }
    public void setS(E s) {
        this.s = s;
    }

    @Override
    public String toString() {
        return "Person{" +
                "s=" + s +
                '}';
    }
}